package com.ty.day5;

import java.io.File;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/28 15:38
 */
public class FileDemo01 {
    static short s;
    public static void main(String[] args) {
        File file = new File("E:/文件夹/java/1","11.txt");
        System.out.println("是目录吗？："+file.isDirectory());
        System.out.println("是文件吗？："+file.isFile());
        System.out.println(file.getAbsoluteFile());
//        s=s+1;
        System.out.println(s);
//        File[] files = file.listFiles();
//        lookFile(files);
//        System.out.println();
    }
    static void lookFile(File[] files){
        for (File f:files){
            if (f.isDirectory()){
                lookFile(f.listFiles());
            }else if (f.isFile()){
                System.out.println(f.getAbsoluteFile());
            }
        }
    }
}
